{% extends "layout.html" %}

{% block __data_browser__nav_bar_block %}
{% endblock %}

{% block body %}
  <div class="container">

    <form action="{{ url_for("auth.login") }}" role="form" class="alert alert-info form-horizontal form-signin" method="POST">

      <div>
       <h4>请登录：</h4>
      </div>
      <hr/>
      {% if error %}
        <div class="alert alert-danger">
          <button type="button" class="close" data-dismiss="alert">&times;</button>
          {{ error }}
        </div>
      {% endif %}

      <div class="form-group">
        <label class="sr-only">登录</label>
        <div class="input-group col-lg-12">
          <span class="input-group-addon">
            <i class="fa fa-user fa-fw"></i>
          </span>
          <input type="text" name="username" id="username" required="required" placeholder="用户名" class="form-control"/>
        </div>

      </div>
      <div class="form-group">
        <label class="sr-only">密码</label>
        <div class="input-group col-lg-12">
          <span class="input-group-addon">
            <i class="fa fa-fw fa-keyboard-o"></i>
          </span>
          <input type="password" name="password" id="password" required="required" placeholder="密码" class="form-control"/>
        </div>
      </div>
      <hr>
      <div class="form-group">
        <div class="col-lg-12">
          <button class="btn btn-block btn-lg btn-success">
            <i class="fa fa-sign-in fa-fw fa-lg"></i>登录
          </button>
        </div>
      </div>
      {% if next_url %}
        <input type="hidden" name="next_url" value="{{ next_url }}">
      {% endif %}
    </form>
  </div>
{% endblock %}
